Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update gnovm Makefile #1371

Closed
wants to merge 6 commits into from
Closed

Conversation

notJoon
Copy link
Member

@notJoon notJoon commented Nov 14, 2023

Added stdlibs that were missing from _test.gnoland.pkg0

@notJoon notJoon requested a review from a team as a code owner November 14, 2023 06:21
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Nov 14, 2023
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.77%. Comparing base (0c2d51e) to head (ec889e8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1371   +/-   ##
=======================================
  Coverage   47.77%   47.77%           
=======================================
  Files         393      393           
  Lines       61630    61630           
=======================================
  Hits        29443    29443           
  Misses      29717    29717           
  Partials     2470     2470           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@moul
Copy link
Member

moul commented Nov 14, 2023

would be nice to automate this, any idea?

@thehowl
Copy link
Member

thehowl commented Nov 14, 2023

So, this one I'd jotted down to fix at some point; thank you for jumping ahead and doing it :)

My take on this:

  • Let's split the tests into TestPackages and TestPackagesLong.
  • TestPackagesLong tests regexp and bytes. Additionally, it is skipped on t.Short()
  • TestPackages, instead, tests all packages in stdlibs/*, except for those tested by -Long.
  • The Makefile is changed with the following
    • _test.gnolang.pkg: -run '^TestPackages$'
    • _test.gnolang.pkg.bytes: -run '^TestPackagesLong$/^bytes'
    • _test.gnolang.pkg.regexp: -run '^TestPackagesLong$/^regexp'. Note, this one should also test package regexp/syntax.

@notJoon
Copy link
Member Author

notJoon commented Nov 15, 2023

would be nice to automate this, any idea?

It would definitely be convenient to automate, but for now I can only think of scanning the directory with a shell script(like find) and then dynamically generating test targets. I'm sure there's a better way, but I'll have to look into it. 🤔

@thehowl
Copy link
Member

thehowl commented Nov 15, 2023

It would definitely be convenient to automate, but for now I can only think of scanning the directory with a shell script

You can just reorganise the tests (see my comment).

@zivkovicmilos
Copy link
Member

Hey @notJoon,

Have you had the chance to implement @thehowl's suggestions?
I guess we can go ahead and merge this fix for now, and leave the test separation for a later PR

Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix 🙏

@thehowl
Copy link
Member

thehowl commented Feb 22, 2024

ping @notJoon

@notJoon
Copy link
Member Author

notJoon commented Feb 23, 2024

ping @notJoon

Oh, I toatally forgot about this PR.

Is there anything else I need to work on? like the automation that we talked before.

@thehowl
Copy link
Member

thehowl commented Feb 23, 2024

@notJoon see my comment for a proposal: #1371 (comment)

It requires adding an exception in code to simply split between "normal" and "long" packages; no automation / code-generation needed.

@notJoon
Copy link
Member Author

notJoon commented Feb 28, 2024

It requires adding an exception in code to simply split between "normal" and "long" packages; no automation / code-generation needed.

Yes, I've updated to based on your comment, and I'm currently working on fixing the tests that aren't passing.

When I run it as an individual file it works fine, but when I run it with make I get the error interface {} is nil, not std.ExecContext. So, I'm trying to figure out why does it happend.

@notJoon notJoon requested a review from a team as a code owner February 28, 2024 03:43
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Feb 28, 2024
@thehowl
Copy link
Member

thehowl commented Mar 4, 2024

When I run it as an individual file it works fine, but when I run it with make

I don't see the tests you're running. Feel free to ping me in DM with stacktraces/info and I can take a look.

From the looks of it, the place where you think the error is happening may be incorrect. It should be somewhere where we're doing an assertion on m.Context (like in gnovm/stdlibs/std/*.go files).

@zivkovicmilos
Copy link
Member

@notJoon Can you merge master into this branch, and check the CI?

Please see @thehowl's comments

@notJoon notJoon requested a review from moul as a code owner April 17, 2024 13:59
@notJoon notJoon marked this pull request as draft April 17, 2024 14:04
@zivkovicmilos
Copy link
Member

After discussing with @notJoon privately, we decided to close out this PR 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Status: Done
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants